using System;
using System.Collections.Generic;
using System.Text;

namespace CppCliWrapper
{
    public class Calculator
    {
        public int Add(int first, int second)
        {
            return first + second;
        }
        public string FormatAsString(float i)
        {
            return i.ToString();
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            Type type = typeof (Calculator);

            List<TypeGenerator> generatorChain = new List<TypeGenerator>();
            generatorChain.Add(new ILBridgeGenerator());
            generatorChain.Add(new NativeExporterHeaderGenerator());
            generatorChain.Add(new NativeExporterSourceGenerator());

            StringBuilder outputText = new StringBuilder();
            foreach (TypeGenerator generator in generatorChain)
            {
                outputText.AppendLine("File: " + generator.GetFileNameFor(type));
                outputText.AppendLine("----------------------------------------------");
                outputText.Append(generator.Generate(type));
                outputText.AppendLine("----------------------------------------------");
            }

            Console.WriteLine(outputText.ToString());
        }
    }
}